The present invention relates to quantization. More specifically, the present invention relates to improved mechanisms for requantization of transform coefficients to reduce the bitrate of encoded bitstreams.
Video data is one particularly relevant form of data that can benefit from improved techniques for rescaling. Video resealing schemes allow digitized video frames to be represented digitally in an efficient manner. Rescaling digital video makes it practical to transmit the compressed signal by digital channels at a fraction of the bandwidth required to transmit the original signal without compression. Generally, compressing data or further compressing compressed data is referred to herein as resealing data. International standards have been created on video compression schemes. The standards include MPEG-1, MPEG-2, MPEG-4, H.261, H.262, H.263, H.263+, etc. The standardized compression schemes mostly rely on several key algorithm schemes: motion compensated transform coding (for example, DCT transforms or wavelet/sub-band transforms), variable length coding (VLC), and quantization of the transform coefficients.
The motion compensated encoding removes the temporally redundant information inherent in video sequences. The transform coding enables orthogonal spatial frequency representation of spatial domain video signals. Quantization of the transformed coefficients reduces the number of levels required to represent a given digitized video sample and reduces bit usage in the compression output stream. The other factor contributing to resealing is variable length coding (VLC) that represents frequently used symbols using code words. In general, the number of bits used to represent a given image determines the quality of the decoded picture. The more bits used to represent a given image, the better the image quality. The system that is used to compress digitized video sequence using the above described schemes is called an encoder or encoding system.
More specifically, motion compensation performs differential encoding of frames. Certain frames, such as I-frames in MPEG-2, continue to store the entire image, and are independent of other frames. Differential frames, such as B-frames or P-frames in MPEG-2, store motion vectors associated with the difference in the frames. The pixel-wise difference between objects is called the error term. In MPEG-2, P-frames reference a single frame while B-frames reference two different frames. Although this allows fairly high reduction ratios, motion compensation is limited when significant changes occur between frames. When significant changes occur between frames in a video sequence, a large number of frames are encoded as reference frames. That is, entire images and not just motion vectors are maintained in a large number of frames. This precludes high reduction ratios. Furthermore, motion compensation can be computationally expensive.
Each frame can be converted to luminance and chrominance components. As will be appreciated by one of skill in the art, the human eye is more sensitive to the luminance resolution than to the chrominance resolution of an image. In MPEG-2, luminance and chrominance frames are divided into 8×8 pixel blocks. The 8×8 pixel blocks are transformed using a discrete cosine transform (DCT) and scanned to create a DCT coefficient vector. Quantization involves dividing the DCT coefficients by a scaling factor. The divided coefficients can be rounded to the nearest integer. After quantization, some of the quantized elements become zero. The many levels represented by the transform coefficients are reduced to a smaller number of levels after quantization. With fewer levels represented, more sequences of numbers are similar. For example, the sequence 8.9 4.1 6.2 1.9 after division by two and rounding becomes 4 2 3 1. Quantization is an irreversible process and hence introduces unrecoverable loss of information associated with the original frame or image.
During transmission of video frames, network requirements often dictate that allowed bitrates change. For example, video frames may have to be resealed further or compressed further to allow transmission onto a particular subnetwork. Requantization is one mechanisms to further rescale or compress an already compressed video stream. The levels represented by quantized transform coefficients are further reduced to a smaller number of levels after requantization. With fewer levels represented, more sequences of numbers are similar. For example, the quantized sequence of 4 2 3 1 after another division by two and rounding becomes 2 1 2 1. Requantization is similarly an irreversible process and hence introduces further loss of information associated with the original frame or image. Consequently, it is desirable to provide improved techniques for minimizing error and inaccuracies due to requantization.